﻿using System.Data;
using System.Drawing;

namespace ConfExpert.Forms.Rapor
{
    public partial class xrTopKesimDetail : DevExpress.XtraReports.UI.XtraReport
    {
        public xrTopKesimDetail()
        {
            InitializeComponent();
        }

        DataTable dtCikisEmriLines = new DataTable();
        public void fillTable(DataTable dt, DataTable dtCikisEmriLines)
        {
            MyDataTopBolmeLines.xTopBolmeLines.Merge(dt);
            this.dtCikisEmriLines = dtCikisEmriLines;
        }

        public void fillTable(DataTable dt)
        {
            MyDataTopBolmeLines.xTopBolmeLines.Merge(dt);
        }

        private void xrTableCell40_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            xrTableCell40.ForeColor = Color.Black;
            string RollId = GetCurrentColumnValue("Roll2Id").ToString();
            bool IsCut = dtCikisEmriLines.Select("RollId = " + RollId).Length > 0;
            if (IsCut)
            {
                xrTableCell40.ForeColor = Color.Red;
                xrTableCell40.Text = xrTableCell40.Text + " *";
            }
        }
    }
}
